import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';

//import App from '../App.vue';
//import index from '../components/index.vue';

import indexView from '../view/indexView.vue';
import odometerView from '../view/odometerView.vue';
import teacherManagementView from '../view/teacherManagementView.vue';
import studentManagementView from '../view/studentManagementView.vue';
import announcementManagementView from '../view/announcementManagementView.vue';
import systemConfigurationView from '../view/systemConfigurationView.vue';
import judgmentServerView from '../view/judgmentServerView.vue';
import problemListView from '../view/problemListView.vue';
import addTopicView from '../view/addTopicView.vue';
import importAndExportTopicsView from '../view/importAndExportTopicsView.vue';
import competitionListView from '../view/competitionListView.vue';
import createCompetitionView from '../view/createCompetitionView.vue'
import courseListView from '../view/courseListView.vue';
import createCourseView from '../view/createCourseView.vue';

/**
 * @type Array<RouteRecordRaw>
 */
const routes = [
    {
        path: '/',
        name: 'indexOdometerView',
        component: odometerView
    }, {
        path: '/index',
        name: 'indexView',
        component: indexView
    }, {
        path: '/odometer',
        name: 'odometerView',
        component: odometerView
    }, {
        path: '/teacherManagement',
        name: 'teacherManagementView',
        component: teacherManagementView
    }, {
        path: '/studentManagement',
        name: 'studentManagementView',
        component: studentManagementView
    }, {

        path: '/announcementManagement',
        name: 'announcementManagementView',
        component: announcementManagementView
    }, {
        path: '/systemConfiguration',
        name: 'systemConfigurationView',
        component: systemConfigurationView
    }, {
        path: '/judgmentServer',
        name: 'judgmentServerView',
        component: judgmentServerView
    }, {
        path: '/problemList',
        name: 'problemListView',
        component: problemListView
    }, {
        path: '/addTopic',
        name: 'addTopicView',
        component: addTopicView
    }, {
        path: '/importAndExportTopics',
        name: 'importAndExportTopicsView',
        component: importAndExportTopicsView
    }, {
        path: '/competitionList',
        name: 'competitionListView',
        component: competitionListView
    }, {
        path: '/createCompetition',
        name: 'createCompetitionView',
        component: createCompetitionView
    }, {
        path: '/courseList',
        name: 'courseListView',
        component: courseListView
    }, {
        path: '/createCourse',
        name: 'createCourseView',
        component: createCourseView
    }
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
});

export default router;